﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EtlData.Entities;

namespace EtlData.Services
{
    public class StationService:IStation
    {

        #region IStation 成员

        public IList<EtlData.Entities.StationModel> GetStations()
        {
            OilStationDataTransEntities sdtEntities = new OilStationDataTransEntities();
            return (from a in sdtEntities.OWN_STATION_INFO
                    select new StationModel
                    {
                        City = a.CITY,
                        STATION_CODE = a.STATION_CODE,
                        STATION_NAME = a.STATION_NAME,
                        STATION_SHORT_NAME = a.STATION_SHORT_NAME,
                        IP_ADD = a.IP_ADD,
                        FILE_ADD = a.FILE_ADD,
                        SYS_CODE = a.SYS_CODE,
                        USE_FLAG = a.USE_FLAG??false
                    }).ToList();
        }

        #endregion
    }
}
